.class public Llt/noframe/gpsfarmguide/gui/GuiFactory;
.super Ljava/lang/Object;
.source "GuiFactory.java"


# instance fields
.field private gui:Llt/noframe/gpsfarmguide/gui/Gui;


# direct methods
.method public constructor <init>()V
    .locals 0

    .line 12
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public buildGui(ILlt/noframe/gpsfarmguide/models/MeasuringModel;)V
    .locals 2

    .line 22
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getGui()Llt/noframe/gpsfarmguide/gui/Gui;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 23
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getGui()Llt/noframe/gpsfarmguide/gui/Gui;

    move-result-object v0

    invoke-interface {v0, p1}, Llt/noframe/gpsfarmguide/gui/Gui;->clearGui(I)V

    .line 24
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Llt/noframe/gpsfarmguide/Data;->setGui(Llt/noframe/gpsfarmguide/gui/Gui;)V

    :cond_0
    const/4 v0, 0x1

    if-eq p1, v0, :cond_4

    const/4 v0, 0x2

    if-eq p1, v0, :cond_3

    const/4 v0, 0x3

    if-eq p1, v0, :cond_2

    const/4 v0, 0x4

    if-eq p1, v0, :cond_1

    goto/16 :goto_0

    .line 54
    :cond_1
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object p1

    invoke-static {p1}, Llt/noframe/gpsfarmguide/LocationTracking;->setMapNotFollowing(Landroid/content/Context;)V

    .line 55
    new-instance p1, Llt/noframe/gpsfarmguide/gui/SprayGui;

    invoke-direct {p1}, Llt/noframe/gpsfarmguide/gui/SprayGui;-><init>()V

    iput-object p1, p0, Llt/noframe/gpsfarmguide/gui/GuiFactory;->gui:Llt/noframe/gpsfarmguide/gui/Gui;

    .line 56
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/Data;->setCurrent_measuring(Llt/noframe/gpsfarmguide/models/MeasuringModel;)V

    .line 57
    iget-object p1, p0, Llt/noframe/gpsfarmguide/gui/GuiFactory;->gui:Llt/noframe/gpsfarmguide/gui/Gui;

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object p2

    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMainFrame()Landroid/widget/FrameLayout;

    move-result-object v0

    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v1

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/Data;->getCurrent_measuring()Llt/noframe/gpsfarmguide/models/MeasuringModel;

    move-result-object v1

    invoke-interface {p1, p2, v0, v1}, Llt/noframe/gpsfarmguide/gui/Gui;->setGui(Landroid/content/Context;Landroid/widget/FrameLayout;Llt/noframe/gpsfarmguide/models/MeasuringModel;)V

    .line 58
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    iget-object p2, p0, Llt/noframe/gpsfarmguide/gui/GuiFactory;->gui:Llt/noframe/gpsfarmguide/gui/Gui;

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/Data;->setGui(Llt/noframe/gpsfarmguide/gui/Gui;)V

    goto/16 :goto_0

    .line 47
    :cond_2
    new-instance p1, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;

    invoke-direct {p1}, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;-><init>()V

    iput-object p1, p0, Llt/noframe/gpsfarmguide/gui/GuiFactory;->gui:Llt/noframe/gpsfarmguide/gui/Gui;

    .line 48
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/Data;->setCurrent_measuring(Llt/noframe/gpsfarmguide/models/MeasuringModel;)V

    .line 49
    iget-object p1, p0, Llt/noframe/gpsfarmguide/gui/GuiFactory;->gui:Llt/noframe/gpsfarmguide/gui/Gui;

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object p2

    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMainFrame()Landroid/widget/FrameLayout;

    move-result-object v0

    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v1

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/Data;->getCurrent_measuring()Llt/noframe/gpsfarmguide/models/MeasuringModel;

    move-result-object v1

    invoke-interface {p1, p2, v0, v1}, Llt/noframe/gpsfarmguide/gui/Gui;->setGui(Landroid/content/Context;Landroid/widget/FrameLayout;Llt/noframe/gpsfarmguide/models/MeasuringModel;)V

    .line 50
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    iget-object p2, p0, Llt/noframe/gpsfarmguide/gui/GuiFactory;->gui:Llt/noframe/gpsfarmguide/gui/Gui;

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/Data;->setGui(Llt/noframe/gpsfarmguide/gui/Gui;)V

    goto/16 :goto_0

    .line 37
    :cond_3
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object p1

    invoke-static {p1}, Llt/noframe/gpsfarmguide/LocationTracking;->setMapNotFollowing(Landroid/content/Context;)V

    .line 38
    new-instance p1, Llt/noframe/gpsfarmguide/gui/GpsGui;

    invoke-direct {p1}, Llt/noframe/gpsfarmguide/gui/GpsGui;-><init>()V

    iput-object p1, p0, Llt/noframe/gpsfarmguide/gui/GuiFactory;->gui:Llt/noframe/gpsfarmguide/gui/Gui;

    .line 39
    new-instance p1, Llt/noframe/gpsfarmguide/models/MeasuringModel;

    new-instance v0, Llt/noframe/gpsfarmguide/models/GpsModel;

    invoke-direct {v0}, Llt/noframe/gpsfarmguide/models/GpsModel;-><init>()V

    invoke-virtual {p2}, Llt/noframe/gpsfarmguide/models/MeasuringModel;->getMeasuringType()I

    move-result p2

    invoke-direct {p1, v0, p2}, Llt/noframe/gpsfarmguide/models/MeasuringModel;-><init>(Llt/noframe/gpsfarmguide/interfaces/Shape;I)V

    .line 40
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p2

    invoke-virtual {p2, p1}, Llt/noframe/gpsfarmguide/Data;->setCurrent_measuring(Llt/noframe/gpsfarmguide/models/MeasuringModel;)V

    .line 41
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p2

    invoke-virtual {p2}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object p2

    new-instance v0, Llt/noframe/gpsfarmguide/states/map_states/GpsDrawingState;

    invoke-direct {v0}, Llt/noframe/gpsfarmguide/states/map_states/GpsDrawingState;-><init>()V

    invoke-virtual {p2, v0}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->setCurrentState(Llt/noframe/gpsfarmguide/states/map_states/MapState;)V

    .line 42
    iget-object p2, p0, Llt/noframe/gpsfarmguide/gui/GuiFactory;->gui:Llt/noframe/gpsfarmguide/gui/Gui;

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v1

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/Data;->getMainFrame()Landroid/widget/FrameLayout;

    move-result-object v1

    invoke-interface {p2, v0, v1, p1}, Llt/noframe/gpsfarmguide/gui/Gui;->setGui(Landroid/content/Context;Landroid/widget/FrameLayout;Llt/noframe/gpsfarmguide/models/MeasuringModel;)V

    .line 43
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    iget-object p2, p0, Llt/noframe/gpsfarmguide/gui/GuiFactory;->gui:Llt/noframe/gpsfarmguide/gui/Gui;

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/Data;->setGui(Llt/noframe/gpsfarmguide/gui/Gui;)V

    goto :goto_0

    .line 29
    :cond_4
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object p1

    invoke-static {p1}, Llt/noframe/gpsfarmguide/LocationTracking;->setMapNotFollowing(Landroid/content/Context;)V

    .line 30
    new-instance p1, Llt/noframe/gpsfarmguide/gui/ManualGui;

    invoke-direct {p1}, Llt/noframe/gpsfarmguide/gui/ManualGui;-><init>()V

    iput-object p1, p0, Llt/noframe/gpsfarmguide/gui/GuiFactory;->gui:Llt/noframe/gpsfarmguide/gui/Gui;

    .line 31
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/Data;->setCurrent_measuring(Llt/noframe/gpsfarmguide/models/MeasuringModel;)V

    .line 32
    iget-object p1, p0, Llt/noframe/gpsfarmguide/gui/GuiFactory;->gui:Llt/noframe/gpsfarmguide/gui/Gui;

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v1

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/Data;->getMainFrame()Landroid/widget/FrameLayout;

    move-result-object v1

    invoke-interface {p1, v0, v1, p2}, Llt/noframe/gpsfarmguide/gui/Gui;->setGui(Landroid/content/Context;Landroid/widget/FrameLayout;Llt/noframe/gpsfarmguide/models/MeasuringModel;)V

    .line 33
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    iget-object p2, p0, Llt/noframe/gpsfarmguide/gui/GuiFactory;->gui:Llt/noframe/gpsfarmguide/gui/Gui;

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/Data;->setGui(Llt/noframe/gpsfarmguide/gui/Gui;)V

    :goto_0
    return-void
.end method
